package com.atguigu.base.v1;

public class SaleTicket {
    public static void main(String[] args) {
        Ticket ticket = new Ticket();


        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 50; i++) {
                    ticket.sale();

                }
            }
        },"A").start();


        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 50; i++) {
                    ticket.sale();

                }
            }
        },"B").start();


        new Thread(new Runnable() {
            @Override
            public void run() {
                for (int i = 0; i < 50; i++) {
                    ticket.sale();

                }
            }
        },"C").start();
    }
}
